﻿@model IEnumerable<DLM.Domain.Model.Photo>
<table summary="my name is rayy!!!" class="tb">
    <colgroup>
        <col class="a" />
        <col class="b" />
        <col class="c" />
        <col class="d" />
    </colgroup>
    <thead>
        <tr>
           <th>
                编号
            </th>
            <th class="b">
                描述
            </th>
            <th>
                照片
            </th>
            <th>
                操作
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @item.PhotoID
                </td>
                <td>
                    @item.Desc
                </td>
                <td>
                    <img src="@Url.Content("~/Files/Photos/" + item.UserID + "/Album/Thumb/" + item.Url)" />
                </td>
                <td>
                    @*  <a href="#" class="tb_delete">删除</a>*@
                    @using (Ajax.BeginForm("RemovePhoto", "User", new { photoID = item.PhotoID, userID = item.UserID }, 
                        new AjaxOptions { HttpMethod = "Post", UpdateTargetId = "divAlbum", InsertionMode = InsertionMode.Replace }))
                    {
                        <input type="submit" class="btn_delete" value="" />
                    }
                </td>
            </tr>
        }
    </tbody>
</table>
